﻿CREATE TABLE [dbo].[Category]
(
	[Model] [uniqueidentifier] NOT NULL, -- FK to Model
	[CategoryId] [uniqueidentifier] DEFAULT newid() NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](max) NULL,
    [CreatedBy] [uniqueidentifier] NOT NULL, -- FK to Person
    [IsDeleted] [bit] DEFAULT 0 NOT NULL,
	[CreatedOn] [datetime] DEFAULT getdate() NOT NULL,
    [LastChanged] [datetime] DEFAULT getdate() NOT NULL,
	[LastChangedBy] [uniqueidentifier] NOT NULL, -- FK to Person
	[TimeStamp] [timestamp] NOT NULL

CONSTRAINT [PK_Category] PRIMARY KEY CLUSTERED 
(
	[CategoryId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO